/* PRQA S 3108++ */
/**
 * Copyright (C) 2024 Isoft Infrastructure Software Co., Ltd.
 * SPDX-License-Identifier: LGPL-2.1-only-with-exception OR  LicenseRef-Commercial-License
 *
 * This library is free software; you can redistribute it and/or modify it under the terms of the
 * GNU Lesser General Public License as published by the Free Software Foundation; version 2.1.
 * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the GNU Lesser General Public License for more details.
 * You should have received a copy of the GNU Lesser General Public License along with this library;
 * if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 * or see <https://www.gnu.org/licenses/>.
 *
 * Alternatively, this file may be used under the terms of the Isoft Infrastructure Software Co., Ltd.
 * Commercial License, in which case the provisions of the Isoft Infrastructure Software Co., Ltd.
 * Commercial License shall apply instead of those of the GNU Lesser General Public License.
 *
 * You should have received a copy of the Isoft Infrastructure Software Co., Ltd.  Commercial License
 * along with this program. If not, please find it at <https://EasyXMen.com/xy/reference/permissions.html>
 ************************************************************************************************************************
 *  @file               : SchM_ComM.h
 *  @version            : V1.0.0
 *  @author             : darren.zhang
 *  @date               : 2022/01/07
 *  @vendor             : isoft
 *  @description        : Communication Manager
 *  @specification(s)   : AUTOSAR classic Platform R19-11
 *
 */
/* PRQA S 3108-- */
#ifndef SCHM_COMM_H_
#define SCHM_COMM_H_

#include "Os.h"
#include "ComM_Gent.h"

/* base lock ComM_MainFunction() */
#if !defined(SchM_Enter_ComM_COMM_EXCLUSIVE_AREA_0)
static inline void SchM_Enter_ComM_COMM_EXCLUSIVE_AREA_0(void)
{
    SuspendAllInterrupts();
}
#endif

#if !defined(SchM_Exit_ComM_COMM_EXCLUSIVE_AREA_0)
static inline void SchM_Exit_ComM_COMM_EXCLUSIVE_AREA_0(void)
{
    ResumeAllInterrupts();
}
#endif

/* base lock local Sender-Receiver var */
#if !defined(SchM_Enter_ComM_COMM_EXCLUSIVE_AREA_1)
#define SchM_Enter_ComM_COMM_EXCLUSIVE_AREA_1()
#endif

#if !defined(SchM_Exit_ComM_COMM_EXCLUSIVE_AREA_1)
#define SchM_Exit_ComM_COMM_EXCLUSIVE_AREA_1()
#endif

#ifdef __cplusplus
extern "C"
{
#endif /* __cplusplus */

#ifdef __cplusplus
}
#endif /* __cplusplus */

#endif /* SCHM_COMM_H_ */
